package methodminxin.manymixin

class PrefixFilter {

    void write(String message){
        message="prefix-----:"+message
        def clazz = this.getClass()
        //遍历mixin的链表,找到当前mixin的前一个
        for(mixin in mixedIn.mixinClasses){
            if(mixin.mixinClass.theClass==metaClass.delegate.theClass) break
            clazz=mixin.mixinClass.theClass
        }
        mixedIn[clazz].write(message)
    }
}
